package string;

/**
 * @author LIBOFEI
 * @ClassName indexof
 * @description
 * @date 2020/10/29 17:20
 * @Version 1.0
 **/
public class indexof {

    public static void main(String[] args) {
        String str = "/admin/images/2019/06/25/62d3efb352c31af2d0537012ad2d01d2.jpg";
        String str2 = "https://xm-yyt.oss-cn-beijing.aliyuncs.com/20210927/image/6SgrwnFJOdOn7zf5rEP8.jpg";
        System.out.println(str.lastIndexOf("."));
        System.out.println(str.substring(str.lastIndexOf(".")));


        System.out.println(str.lastIndexOf("/"));
        System.out.println(str.substring(str.lastIndexOf("/") + 1));


        String str3 = "1111111.0.0.1/24";
        System.out.println(str3.startsWith("192"));
        System.out.println(str3.startsWith("10"));

        System.out.println(str3.indexOf("."));
        System.out.println(str3.indexOf(".",str3.indexOf(".") + 1));
        System.out.println(str3.substring(0,str3.indexOf(".",str3.indexOf(".") + 1)));
    }
}
